# -*- coding: utf-8 -*-
from sqlalchemy import Column, Integer, BigInteger, String, DateTime

from core.database import Base
from core.database import TimestampMixin

class TbUser(Base, TimestampMixin):
    __tablename__ = 'sys_user'

    id = Column(Integer, primary_key=True)
    account =  Column(String(128), comment ='账号')
    # username = Column(String(128))
    nickname =  Column(String(128), comment ='昵称')
    real_name =  Column(String(128), comment ='真实姓名')
    user_type =  Column(Integer, comment ='用户类型')
    password =  Column(String(256), comment ='密码')
    slat =  Column(String(256), comment ='盐')
    email =  Column(String(256), comment ='邮箱')
    mobile =  Column(String(64), comment ='手机号')
    gender =  Column(Integer, comment ='性别')
    birthday = Column(DateTime, default=None, comment ='生日')
    signature =  Column(String(256), comment ='个性签名')
    # self_signature =  Column(String(256))
    avatar =  Column(String(256), comment ='头像')
    status =  Column(Integer, default=0, comment ='状态')
    login_ip =  Column(String(256), comment ='登录IP')
    lasted = Column(DateTime, default=None, comment ='最后登录时间')
